<%
num ||= 0
-%>
<dl class="attachment" id="attachment_<%= num %>">
  <dt>
    Attach
  </dt>
  <dd>
    <%= link_to_remote 'image',
            :url => {
              :controller => 'attachments',
              :action => 'form_for',
              :num => num,
              :type => 'Image' }
    %>
    &nbsp;
    <%= link_to_remote 'patch',
            :url => {
              :controller => 'attachments',
              :action => 'form_for',
              :num => num,
              :type => 'PatchFile' }
    %>
    &nbsp;
    <%= link_to_remote 'file',
            :url => {
              :controller => 'attachments',
              :action => 'form_for',
              :num => num,
              :type => 'GenericFile' }
    %>
    &nbsp;
    <%= link_to_remote 'issue',
            :url => {
              :controller => 'attachments',
              :action => 'form_for',
              :num => num,
              :type => 'IssueRef' }
    %>
    &nbsp;
    <%= link_to_remote 'comment',
            :url => {
              :controller => 'attachments',
              :action => 'form_for',
              :num => num,
              :type => 'CommentRef' }
    %>
  </dd>
</dl>
